(DEFUN c:fix-title ()
  (if attupd NIL (LOAD "attupd" "\nFile ATTUPD.LSP not loaded! "))
  (SETQ new_att_str
          (STRCAT
            ;the following Specific Sheet Set field value
            "%<\\AcSm Database(\"L:\\Elgin-15.01\\800 Drawings\\810 Design Drawings\\Elgin-1501-PRC Pipeline.dst\").SheetSet(\"gDFF506E4-738E-4D0D-A2FB-37F4CA954155\").Component(\"g816BB8AC-6064-41A7-AFBF-3A697B606D6E\").Name \\f \"%tc4\">%"
            "\\P"
            "%<\\AcSm Sheet.Title \\f \"%tc4\">%"	;general sheet title, field value is "CurrentSheetTitle"
            "\\P"
            ;the following Specific Sheet Set field value
            "%<\\AcSm Database(\"L:\\Elgin-15.01\\800 Drawings\\810 Design Drawings\\Elgin-1501-PRC Pipeline.dst\").SheetSet(\"gDFF506E4-738E-4D0D-A2FB-37F4CA954155\").Component(\"g70C10E4C-3CB0-49A6-BB0E-F7DC3AAD3D18\").Name \\f \"%tc4\">%"
            " LINE "
            ;the following Specific Sheet Set field value
            "%<\\AcSm Database(\"L:\\Elgin-15.01\\800 Drawings\\810 Design Drawings\\Elgin-1501-PRC Pipeline.dst\").SheetSet(\"gDFF506E4-738E-4D0D-A2FB-37F4CA954155\").Component(\"g55F1247B-F406-4C44-A496-D991B4840A0A\").Name \\f \"%tc4\">%"
          )
  )
  (SETQ timecnt 0)
  (WHILE (< timecnt 1000)(SETQ timecnt (1+ timecnt)));seemed necessary to let field reactors catch up for a short time before the next action
  (attupd "mbd-lkcttbats" "TITLE_1" new_att_str)
  ;The following is code for a specific sheet number"
  (attupd "mbd-lkcttbats" "SSM_SHT_NO" "%<\\AcSm Database(\"L:\\Elgin-15.01\\800 Drawings\\810 Design Drawings\\Elgin-1501-PRC Pipeline.dst\").SheetSet(\"gDFF506E4-738E-4D0D-A2FB-37F4CA954155\").Component(\"gC430C87E-BA98-410A-8D6C-0A9F72E12EED\").Number \\f \"%tc4\" \\href \"L:\\Elgin-15.01\\800 Drawings\\810 Design Drawings\\05088 Plan & Profile Sheet FM-05.dwg#,Sta 1125+00 - Sta 1134+85##1\">%")
  (SETQ title-ss (SSGET '((2 . "mbd-lkcttbats"))))
  (SETQ title-ent (SSNAME title-ss 0))
  (WHILE (< timecnt 1000)(SETQ timecnt (1+ timecnt)));seemed necessary to let field reactors catch up for a short time before the next action
  (COMMAND ".UPDATEFIELD" title-ent "" "")
  (PRINC)
)
